import request from '@/utils/request'

export function getAdminList(data) {
  return request({
    url: '/admin/getListByPage?page=' + data.page + '&limit=' + data.limit + '&searchName=' + data.searchName,
    method: 'get'
  })
}

export function banAdmin(data) {
  return request({
    url: '/admin/ban',
    method: 'post',
    data: data
  })
}

export function cancelBanAdmin(data) {
  return request({
    url: '/admin/cancelBan',
    method: 'post',
    data: data
  })
}

export function addAdmin(data) {
  return request({
    url: '/admin/add',
    method: 'post',
    data: data
  })
}

